home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / ast_comp / faq.txt < prev    next >
Text File  |  1993-07-04  |  19KB  |  381 lines

  1. Subject: comp.compilers monthly message and Frequently Asked Questions
  2. From: compilers-request@iecc.cambridge.ma.us (John R. Levine)
  3. Organization: Compilers Central
  4. Keywords: administrivia
  5. Approved: compilers@iecc.cambridge.ma.us
  6. Followup-To: poster
  7.  
  8. Archive-name: compilers-faq
  9.  
  10. This is the comp.compilers monthly message, last edited April 1993.
  11.  
  12. NOTE:  At the end of this message are some answers to frequently asked
  13. questions.  Please read them before you post.
  14.  
  15. -- What is comp.compilers?
  16.  
  17. It is a moderated usenet news group addressing the topics of compilers in
  18. particular and programming language design and implementation in general.
  19. It started in 1986 as a moderated mailing list, but interest quickly grew to
  20. the point where it was promoted to a news group.  Recent topics have
  21. included optimization techniques, language design issues, announcements of
  22. new compiler tools, and book reviews.
  23.  
  24. Messages come from a wide variety of people ranging from undergraduate
  25. students to well-known experts in industry and academia.  Authors live all
  26. over the world -- there are regular messages from the U.S, Canada, Europe,
  27. Australia, and Japan, with occasional ones from as far away as Malaysia.  I
  28. have no idea how large the readership is, since the anarchic nature of
  29. usenet makes it impossible to tell who reads it, but I believe that the total
  30. is in the tens of thousands.
  31.  
  32. Unless there is specific language to the contrary, each message represents
  33. only the personal opinion of its author.  I claim no compilation copyright on
  34. comp.compilers.  As far as I am concerned, anyone can reproduce any message
  35. for any purpose.  Individual authors may retain rights to their messages,
  36. although I will not knowingly post anything that does not permit unlimited
  37. distribution in any form.  If you find comp.compilers useful in writing a
  38. book, producing a product, etc., I would appreciate an acknowledgement of
  39. usenet and comp.compilers.
  40.  
  41. -- How do I receive it?
  42.  
  43. The easiest way is to read comp.compilers on a system that gets usenet news.
  44.  
  45. If you don't have access to usenet news, it's also available via E-mail via
  46. a LISTSERV forwarder at the American University.  To subscribe a person
  47. should send e-mail to listserv@american.edu with one line in the mail
  48. message (not in the subject!)  That line should read:
  49.  
  50.                         SUBSCRIBE COMPIL-L full_name
  51. for example:
  52.                         SUBSCRIBE COMPIL-L Ima Hacker
  53.  
  54. To get off the list the subscriber should send e-mail to the same address
  55. with the message:       SIGNOFF COMPIL-L
  56.  
  57. If you have problems getting on or off the list, please contact me.  In
  58. particular, if you want to use an address other than your own personal mail
  59. address, you have to ask me to set it up.  If I receive bounce messages for
  60. an address on the mailing list for two days in a row, I delete it.  If this
  61. happens to you and your address subsequently becomes reachable again, you
  62. can resubscribe.
  63.  
  64. -- How do I submit a message?
  65.  
  66. Mail it to compilers@iecc.cambridge.ma.us, also known as compilers@iecc.uucp
  67. or iecc!compilers.  I review messages nearly every day, usually including
  68. weekends, and most messages are posted to the net within a day after I
  69. receive them.  Occasionally when I go on vacation there may be up to a
  70. week's delay, though I try to send out a message when that will happen.
  71.  
  72. Most net news systems will automatically turn posted messages into mail to
  73. compilers, but some, particularly systems running notes, don't do that
  74. correctly.  As a result, I sometimes receive hundreds of copies of a
  75. message, all mangled slightly differently.  Please mail your contributions
  76. unless you're sure your posting software works correctly.
  77.  
  78. When you send a message to compilers, I understand that to mean that you
  79. want me to post it to usenet, which means it will be sent to tens of
  80. thousands of potential readers at thousands of computers all around the
  81. world.  It may also appear in a printed comp.compilers annual and other
  82. books, in the ACM SIGPLAN Notices, in on-line and off-line archives,
  83. CD-ROMs, and anywhere else that some reader decides to use it.
  84.  
  85. If you don't want me to post something, send it instead to
  86. compilers-request.  (See below.)
  87.  
  88. -- What happens to submitted messages?
  89.  
  90. Barring mail problems, they arrive in a special mailbox here at iecc.  I
  91. then edit the headers, trim down quoted text, fix typos and grammatical
  92. errors, remove cute signatures, and then post them to usenet.  If I think a
  93. message needs more editing than that, I return it to the author for
  94. rewriting.  The main reasons I return a message are that it appears more
  95. appropriate for another group, the message is too garbled to fix, it
  96. contains too much quoted material relative to the amount of new material, or
  97. I don't understand it.  I also usually return messages that directly attack
  98. individuals, since the net has plenty of other places for ad-hominem battles.
  99. Another possibility is that a message doesn't have a valid return e-mail
  100. address.  If your mail system insists on putting a bogus address in the From:
  101. line, be sure that you put a usable address in your signature.
  102.  
  103. If a message asks a simple question I sometimes answer it myself rather than
  104. posting it.  When two or three messages arrive with the same answer to a
  105. question, I usually post only one of them, with a comment crediting the
  106. others.
  107.  
  108. If you send in a message and don't either see it posted or receive something
  109. back in a few days, it probably got lost in the mail and you should contact
  110. me, preferably via a different mail route.  I post or respond to all
  111. messages except for ones that appear to have been sent by mistake, e.g. no
  112. contents, or contents consisting only of another quoted message.  Sometimes
  113. when I'm feeling exasperated I disregard messages that re-ask one of the
  114. frequently asked questions that are answered below.
  115.  
  116. One of the most time-consuming jobs in moderating the group is trimming down
  117. the quotes in followup articles.  In most cases, you can expect readers to
  118. have seen the previous article, so only a few lines of quoted text should be
  119. needed to remind the reader of the context.
  120.  
  121. I have installed a simple-minded quote filter that mechanically returns to
  122. the sender any message that contains more quoted than unquoted lines.  Please
  123. edit your quotes before you send in a response, to avoid having the filter
  124. bounce your message.  Since the quote filter is pretty dumb, I do look at
  125. bounced messages myself.  If the filter bounces a message of yours by mistake,
  126. don't panic -- it'll get posted anyway.
  127.  
  128. ``Help wanted'' and ``Position Available'' messages are collected each week
  129. and posted in a digest every Sunday.
  130.  
  131. -- How do I respond to the author of a message?
  132.  
  133. I try to be sure that every message contains valid From: and Reply-To:
  134. headers.  The automatic "reply" commands in most news readers let you send
  135. mail to the author.  If you're replying to a message in a digest, be sure
  136. to respond to the author of the particular message, not to the pseudo-author
  137. of the digest.
  138.  
  139. Some obsolete news readers attempt to reply using the Path: header, but for
  140. technical reasons the Path: header in a moderated message cannot point to
  141. the actual author.  In fact, the Path: header in a compilers message is
  142. deliberately a bad mail address, so if you have such a news reader you'll
  143. have to edit the addresses in responses yourself and, I hope, encourage your
  144. system manager to update your news and mail software.
  145.  
  146. Sometimes mail to an author bounces, either because a gateway isn't
  147. working or because the return address is unregistered or otherwise bad.
  148. Please don't ask me to forward it, since my machine is no better connected
  149. than anyone else's.  (It's not on the Internet and only talks uucp.)  If
  150. you send me a message obviously intended for the author of an item, I will
  151. discard it on the theory that if it wasn't important enough for you to
  152. send it to the right place, it isn't important enough for me, either.
  153.  
  154. -- How do I contact the moderator?
  155.  
  156. Send me mail at compilers-request@iecc.cambridge.ma.us.  If for some
  157. reason your system chokes on that address (it shouldn't, it's registered)
  158. mail to Levine-John@yale.edu or johnl@spdcc.com will get to me.  I treat
  159. messages to compilers-request as private messages to me unless they state
  160. that they are for publication.
  161.  
  162. -- Are back issues available?
  163.  
  164. I have complete archives going back to the original mailing list in 1986.
  165. The archives now fill about 6 megabytes, and are growing at over 200K per
  166. month.  I update the archives at the end of each month.  People with ftp
  167. access can get them from primost.cs.wisc.edu, (128.105.2.115) where James
  168. Larus has kindly provided space.  The archives contain a compressed Unix
  169. mailbox format file for each month, with names like 91-08.Z.  The file
  170. INDEX.Z lists all of the subject lines for every message in the archives,
  171. and in most cases is the first file you should retrieve.
  172.  
  173. The archives are available via modem from Channel One, an excellent local
  174. BBS.  You have to register, but no payment is needed to download the
  175. archives which are in Area 6.  (If you call more than once or twice, it
  176. would be nice to sign up for at least the $25 trial membership.)  The 2400
  177. BPS telephone number is +1 617 354 8873, and the Telebit number is +1 617
  178. 354 0470.  There is a ZIP format archive per month with names like
  179. comp9108.zip, with the most recent archive also containing the index.
  180.  
  181. There is now a mail server at compilers-server@iecc.cambridge.ma.us that can
  182. mail you indexes, messages, and the files mentioned below.  Send it a
  183. message containing "help" to get started.
  184.  
  185. I have also published a printed edition of the 1990 messages grouped by
  186. thread and topic, and with some indexes, and may publish subsequent
  187. editions.  Send me mail for further details, or see the message about the
  188. book which should immediately follow this one.
  189.  
  190. -- Some Frequently Asked Questions:
  191.  
  192. NOTE: Many issues are discussed occasionally on comp.compilers, but not
  193. frequently enought to make the FAQ sheet.  If you have a question but the
  194. answer isn't in the FAQ, you may well be able to get good background by
  195. reading the appropriate articles in the archive.  If you can FTP, please
  196. at least get the index and look through it.
  197.  
  198. The various files that I mention below that I have are in the compilers
  199. archive at primost.cs.wisc.edu, and are also available from the mail
  200. server mentioned above.  If you can FTP them, please do so rather than
  201. using the mail server, since the mail bandwith is quite small.
  202.  
  203. * Where can I get a C or C++ grammar in yacc?
  204.  
  205. Jim Roskind's well-known C++ grammar is in the archive, as is a C grammar
  206. written by Jeff Lee.  Dave Jones posted a parser as message 91-09-030.
  207. Another C grammar was posted to comp.sources.misc in June 1990, v13 i52,
  208. archive name ansi-c_su.  GCC and G++ are based on yacc grammars, see
  209. below.
  210.  
  211. * Where can I get the Gnu C compiler?
  212.  
  213. GCC is a high-quality free C and C++ compiler.  (Free is not the same as
  214. public domain, see the GCC distribution for details.)  It is available in
  215. source from from prep.ai.mit.edu.  You need an existing C compiler and
  216. libraries to bootstrap it.
  217.  
  218. A version for 386 MS-DOS by DJ Delorie <dj@ctron.com> is available by FTP
  219. from omnigate.clarkson.edu or wowbagger.pc-labor.uni-bremen.de and by
  220. mail from archive-server@omnigate.clarkson.edu in the archive msdos/djgpp.
  221. See messages 91-09-054 and 91-09-066.  Note: When omnigate is overloaded,
  222. it responds with "Access Denied."  Try later.
  223.  
  224. * Are there other free C compilers?
  225.  
  226. The lcc compiler, written by people at Princeton and Bell Labs, is
  227. available via FTP from princeton.edu.  It is supposed to generate code as
  228. good as GCC while being considerably faster and smaller.  It comes with a
  229. demonstration VAX code generator and documentation on the code generation
  230. interfaces.  Production code generators for the VAX, MIPS, and Motorola
  231. 68020 are available for research use to universities willing to execute a
  232. license agreement; the FTP package elaborates.  Lcc uses a hard-coded C
  233. parser because it's faster than yacc.
  234.  
  235. * Where can I get a Fortran grammar in yacc or a Fortran compiler?
  236.  
  237. I have a small subset parser in the archive mentioned above.  The F2C
  238. Fortran to C translator is a respectable Fortran system (so long as
  239. you have a C compiler to compile its output and its libraries) and
  240. contains a full F77 parser and is available in source form via FTP
  241. from research.att.com and by mail from netlib@research.att.com.
  242.  
  243. * Where can I get Modula-2, Pascal or Ada grammars in yacc?
  244.  
  245. I have one each of those, too, in the archive mentioned above, though I
  246. haven't tried to use any of them.
  247.  
  248. * Where can I get a Cobol grammar in yacc?
  249.  
  250. Nowhere for free, as far as I can tell.  This question is asked every few
  251. months and there has never, ever, been any positive response. Perhaps some
  252. of the interested people could get together and write one.  The commercial
  253. PCYACC from Abraxas (see below) comes with a bunch of sample grammars
  254. including one for Cobol-85.
  255.  
  256. * Where can I get a Basic grammar in yacc?
  257.  
  258. Take a look at ftp.uu.net:comp.sources.unix/volume2/basic which contains
  259. a Basic interpreter with yacc parser.
  260.  
  261. * Are there free versions of yacc and lex ?
  262.  
  263. Vern Paxton's flex is a superior reimplementation of lex.  It is available
  264. from the same places as Gnu sources.  Berkeley Yacc is a quite compatible
  265. PD version of yacc by Bob Corbett, available as ~ftp/pub/byacc.tar.Z on
  266. okeeffe.berkeley.edu.  Gnu Bison is derived from an earlier version of
  267. Corbett's work and is also fairly compatible with yacc.
  268.  
  269. * Are there versions of yacc and lex for MS-DOS?
  270.  
  271. There are several of them.  Commercial versions are MKS lex&yacc from MKS
  272. in Waterloo Ont., +1 519 884 2251 or inquiry@mks.com, and PCYACC from
  273. Abraxas Software in Portland OR, +1 503 244 5253.  Both include both yacc
  274. and lex along with a lot of sample code.
  275.  
  276. The standard flex source compiles under the usual DOS compilers, although
  277. you may want to make some of the buffers smaller.  A DOS version of Bison
  278. is on wuarchive.wustl.edu [128.252.135.4] and other servers under
  279. /mirrors/msdos/txtutl/bison111.zip. See message 92-07-012 for more info.
  280.  
  281. * What other compilers and tools are freely available?
  282.  
  283. There is a three-part FAQ posting in comp.compilers and other groups
  284. listing compiler tools freely available in source form, maintained by
  285. David Muir Sharnoff <muir@cogsci.berkeley.edu>.  It is posted
  286. monthly, right after this message.  If it's not on your system, you
  287. can FTP it from pit-manager.mit.edu in the directory
  288. /pub/usenet/news.answers/free-compilers, or via mail by sending a
  289. message to to mail-server@pit-manager.mit.edu with the command "send
  290. usenet/news.answers/free-compilers/*" in the text.
  291.  
  292. * How can I get started with yacc and lex and compiler writing in general?
  293.  
  294. By reading any of the many books on the topic.  Here are a few of them.
  295. Also see message 93-01-155 which reviews many compiler textbooks.
  296.  
  297. Aho, Sethi, and Ullman, "Compilers: Principles, Techniques, and Tools,"
  298. Addison Wesley, 1986, ISBN 0-201-10088-6, the "dragon book".  Describes
  299. clearly and completely lexing and parsing techniques including the ones in
  300. yacc and lex.  The authors work or have worked at Bell Labs with Steve
  301. Johnson and Mike Lesk, the authors of Yacc and Lex.
  302.  
  303. Alan Holub, "Compiler Design in C," Prentice-Hall, 1990, ISBN
  304. 0-13-155045-4.  A large book containing the complete source code to a
  305. reimplementation of yacc and lex and a C compiler.  Quite well written,
  306. too, though it has a lot of errors.  The fourth printing is supposed to
  307. correct most of them.
  308.  
  309. John R. Levine, Tony Mason, and Doug Brown, ``Lex & Yacc,'' 2nd Edition,
  310. O'Reilly and Associates, 1992, ISBN 1-56592-000-7, $29.95.  A concise
  311. introduction with completely worked out examples and an extensive
  312. reference section.  The new edition is completely revised from the earlier
  313. 1990 edition.
  314.  
  315. Donnely and Stallman, "The Bison Manual," part of the on-line distrubution
  316. of the FSF's Bison, a reimplementation of yacc.  As with everything else from
  317. the FSF, full source code is included.
  318.  
  319. Axel T. Schreiner and H. George Friedman, Jr., "Introduction to Compiler
  320. Construction with UNIX," Prentice-Hall, 1985.  Oriented to tutorial work.
  321. Good for beginners.  Develops a small subset-of-C compiler through the book.
  322. (Recommended by Eric Hughes <hughes@ocf.Berkeley.EDU>.)  Richard Hash
  323. <rgh@shell.com> comments that the book has many typographical errors, and
  324. readers should be suspicious of the examples until they actually try them.
  325. Richard Y. Kim <richard@ear.mit.edu> reports that sources are available for
  326. FTP as a.cs.uiuc.edu:pub/friedman/tar.
  327.  
  328. Bennett, J.P. "Introduction to Compiling Techniques - A First Course Using
  329. Ansi C, Lex and Yacc," McGraw Hill Book Co, 1990, ISBN 0-07-707215-4.
  330. It's intended for a first course in modern compiler techniques, is very
  331. clearly written, and has a full chapter on YACC.  I found it to be a good
  332. introductory text before getting into the 'Dragon book'.  (Recommended by
  333. John Merlin <J.H.Merlin@ecs.southampton.ac.uk>.)  Source code is available
  334. at ftp.bath.ac.uk.
  335.  
  336. Charles N. Fischer & Richard J. LeBlanc, "Crafting A Compiler", Benjamin
  337. Cummings Publishing, Menlo Park, CA, 1988, ISBN 0-8053-3201-4.  There's
  338. also a revised version as of 1990 or 1991 titled "Crafting A Compiler in
  339. C", with all examples in C (the original used ADA/CS).  Erich Nahum
  340. <nahum@cs.umass.edu> writes: A key compiler reference.  We used the
  341. original to great effect in Eliot Moss' graduate compiler construction
  342. class here at UMass.  My feeling is that Fischer & LeBlanc is a good
  343. tutorial, and one should use Aho, Sethi, & Ullman as a reference.
  344.  
  345. Des Watson, "High-Level Languages and Their Compilers," International
  346. Computer Science Series, Addison-Wesley Publishing Company, Wokingham
  347. England, 1989.  Adrian Howard <adrianh@cogs.sussex.ac.uk> writes: This is
  348. the kindest, most readable introduction to compilers at the graduate level
  349. I have ever read - an excellent example of what textbooks should all be
  350. like.
  351.  
  352. W.M. Waite and G. Goos, "Compiler Construction," Springer-Verlag, New
  353. York, 1984.  Dick Grune <dick@cs.vu.nl> writes: A theoretical approach to
  354. compiler construction. Refreshing in that it gives a completely new view
  355. of many subjects. Heavy reading, high information density.
  356.  
  357. J.P. Tremblay and P.G. Sorenson, "The Theory and Practice of Compiler
  358. Writing," McGraw-Hill, 1985.  Dick Grune <dick@cs.vu.nl> writes: Extensive
  359. and detailed. Heavy reading. To be consulted when other sources fail.
  360.  
  361. James E. Hendrix, "The Small-C Compiler", 2nd ed., M&T Books, ISBN
  362. 0-934375-88-7 <Book Alone>, 1-55851-007-9 <MS-DOS Disk>,
  363. 0-934375-97-6 <Book AND Disk>.
  364.  
  365. William Jhun <ec_ind03@oswego.edu> writes: It explaines the C-language is
  366. thorough....and explains every single aspect of the compiler. The book
  367. compares source code to p-code to assembly. It goes over a nice set of
  368. optimization routines, explains the parser, the back end, and even
  369. includes source code, which the compiler on the disk can actually compile
  370. itself. It's an extremely interesting book, check it out.
  371.  
  372. If anyone sends in others, I'll be happy to add them to the list.
  373.  
  374. * Where I can I FTP the sources to the programs in Holub's "Compiler
  375. Design in C" ?
  376.  
  377. You can't.  See page xvi of the Preface for ordering information.
  378.  
  379. Regards,
  380. John Levine, comp.compilers moderator
  381.